<?php

namespace App\Validators\Teacher;

use App\Validators\PassesValidator;
use \Prettus\Validator\Contracts\ValidatorInterface;
use \Prettus\Validator\LaravelValidator;

class CompositionValidator extends LaravelValidator
{
    use PassesValidator;

    protected $rulesMessages=[
        'teacher_id.required' => '教师ID不能为空',
        'summary.required' => '摘要是必填的',
        'acquire_date.required'  => '创造时间是必填的',
    ];

    protected $rules = [
        ValidatorInterface::RULE_CREATE => [
            'teacher_id'=>'required',
            'summary'=>'required',
            'acquire_date'=>'required',
        ],
        ValidatorInterface::RULE_UPDATE => [],
   ];
}
